net: Prevent overflows when allocating memory for arrays
authorLidong Chen <lidong.chen@oracle.com>
Wed, 22 Jan 2025 18:04:43 +0000 (18:04 +0000)
committerFelix Zielcke <fzielcke@z-51.de>
Wed, 11 Jun 2025 15:42:34 +0000 (17:42 +0200)
commit0b42f82aa599adb3f6360cb7f472c4621056efdf
treee058b02e9a93106b11d65d525cdc2401133831a5
parent385d28ecf7076ba93b952a72b3dc5b3e5db76b5a
net: Prevent overflows when allocating memory for arrays

Use grub_calloc() when allocating memory for arrays to ensure proper
overflow checks are in place.

Signed-off-by: Lidong Chen <lidong.chen@oracle.com>
Reviewed-by: Daniel Kiper <daniel.kiper@oracle.com>
Gbp-Pq: Topic cve-2025-jan
Gbp-Pq: Name net-Prevent-overflows-when-allocating-memory-for-arrays.patch
grub-core/net/dns.c
grub-core/net/net.c